﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class EnemyControl : MonoBehaviour {

    public float b;
    public float a;
    public int rate = 1;
    void Start()
    {
      
    }

    // Update is called once per frame
    void Update()
    {
        
        float x = Mathf.Sin(Time.time*rate)*a + b;
       // Debug.Log("time-x:" + x);
        transform.position = new Vector3(x, transform.position.y, transform.position.z);

    }
}
